﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoolCode.Data;
using CoolCode.Services;
using CoolCode.Bracket.LinqToEntity.Entities;

namespace CoolCode.Bracket.LinqToEntity
{
    public abstract class BracketService:ServiceBase
    {
        public BracketService()
            : base()
        {
            loadDataContext(); 
        }

        private void loadDataContext ()
        {
            string connectionString = DataContextProxy.GetConnectionString("BarcketEntities");
            this.CreateDataContextFrom(() => new CoolCode.Data.Entity.XDataContext(new XProEntities(connectionString)));
        }
    }
}
